package com.kantboot.business.talent.domain.entity;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import java.util.Date;

/**
 * 人才奖项
 */
@Entity
@Getter
@Setter
@Table(name = "bus_talent_award")
@Accessors(chain = true)
@EntityListeners(AuditingEntityListener.class)
@DynamicUpdate
@DynamicInsert
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id")
public class BusTalentAward implements Serializable {

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 创建时间
     */
    @CreatedDate
    @Column(name = "gmt_create")
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @CreatedDate
    @Column(name = "gmt_modified")
    private Date gmtModified;

    /**
     * 名称
     */
    @Column(name = "t_name")
    private String name;

    /**
     * 是否参与名次
     * 管理后台如果是否：就显示`此奖项无排名`
     */
    @Column(name = "is_has_rank")
    private Boolean isHasRank;

    /**
     * 是否参与等次
     * 管理后台如果是否：就显示`此奖项无等次`
     */
    @Column(name = "is_has_grade")
    private Boolean isHasGrade;

    /**
     * 描述
     */
    @Column(name = "description")
    private String description;

}
